# -*- coding: utf-8 -*-
from django import forms
from utils.captcha.captcha import Captcha
import json


class LoginForm(forms.Form):
    username = forms.CharField(max_length=10, min_length=4)
    password = forms.CharField(max_length=20,min_length=6)
    remember = forms.BooleanField(required=False) #用户有可能不需要记住我,那么这个参数有可能就没有

class RegisterForm(forms.Form):
    username = forms.CharField(required=True)
    password = forms.CharField(required=True)
    re_password = forms.CharField(required=True)
    money = forms.CharField(required=True)
    gender = forms.CharField(required=True)
    email = forms.CharField(required=True)
    phone = forms.CharField(required=True)
    qq_number = forms.CharField(required=True)


class Client_loginFrom(forms.Form):
    username = forms.CharField(max_length=10, min_length=4)
    password = forms.CharField(max_length=20, min_length=6)

class Personnel_RegisterForm(forms.Form):
    username = forms.CharField(max_length=10, min_length=4)
    base_salary = forms.IntegerField()
    phone = forms.CharField(max_length=11)
    gender = forms.CharField(max_length=3)
    email = forms.CharField(max_length=15)
    id_card = forms.CharField(max_length=20)
    native_place = forms.CharField(max_length=20)
    employee_category = forms.CharField(max_length=2)
    qq_number = forms.CharField(max_length=25)


class OrderFrom(forms.Form):
    havehaircut_username = forms.CharField(max_length=10, min_length=4)
    washhair_username = forms.CharField(max_length=10, min_length=4)
    Client_name = forms.CharField(max_length=10, min_length=4)
    password = forms.CharField(max_length=20, min_length=6)
    order_money = forms.IntegerField()

# class Client_orderFrom(forms.Form):
#     password = forms.CharField(max_length=20, min_length=6)


class Modif_passwordFrom(forms.Form):
    dated_password = forms.CharField(max_length=20, min_length=6)
    new_password = forms.CharField(max_length=20, min_length=6)
    renew_password = forms.CharField(max_length=20, min_length=6)

class Reset_passwordFrom(forms.Form):
    username = forms.CharField(max_length=20, min_length=6)





class Modif_userhomeFrom(forms.Form):
    username = forms.CharField(max_length=20, min_length=6)
    phone = forms.CharField(max_length=20, min_length=6)
    qqnumber = forms.CharField(max_length=20, min_length=6)
    gender = forms.CharField(max_length=20, min_length=6)



class Modif_personnelhomeFrom(forms.Form):
    username = forms.CharField(max_length=10, min_length=4)
    base_salary = forms.IntegerField()
    phone = forms.CharField(max_length=11)
    gender = forms.CharField(max_length=3)
    email = forms.CharField(max_length=15)
    id_card = forms.CharField(max_length=20)
    native_place = forms.CharField(max_length=20)
    employee_category = forms.CharField(max_length=2)
    qq_number = forms.CharField(max_length=25)



class Client_rechargeFrom(forms.Form):
    username = forms.CharField(max_length=20, min_length=6)
    money = forms.CharField(max_length=20, min_length=6)
